import com.alibaba.fastjson.JSONObject;

public class Base64 {

    public static void main(String[] args) {
//        byte[] decodedBytes = java.util.Base64.getDecoder().decode("eyJ2ZXJzaW9uIjoiMS4wIiwicGFja2FnZU5hbWUiOiJjb20uc21pbGVwYXJ0eS5wYXdhbGl2ZSIsImV2ZW50VGltZU1pbGxpcyI6IjE3NDE1OTk1MzEwMDMiLCJvbmVUaW1lUHJvZHVjdE5vdGlmaWNhdGlvbiI6eyJ2ZXJzaW9uIjoiMS4wIiwibm90aWZpY2F0aW9uVHlwZSI6MSwicHVyY2hhc2VUb2tlbiI6Im5hbmRjbW9vaWZlaGxsZWphZ2pjYmxkZi5BTy1KMU93SVFoSEtqdk1HQkVHZk5IYUJybGpoSXhnbEZWcUhZQWg0TlgwZk5peUtGRThHMjVxNGY3N2k3cWZobjkxTlJFRldJYjhXS1VEZ0t4SmZaSnQzb3V5QmFndFVaUkFteU1RSWJ4WXhNYzVtajZYcEs0dyIsInNrdSI6Imdvb2dsZS5wYXdhLmRpYW1vbmQyIn19");
//        byte[] decodedBytes1 = java.util.Base64.getDecoder().decode("eyJ2ZXJzaW9uIjoiMS4wIiwicGFja2FnZU5hbWUiOiJjb20uc21pbGVwYXJ0eS5wYXdhbGl2ZSIsImV2ZW50VGltZU1pbGxpcyI6IjE3NDE1OTYzOTg3NTIiLCJvbmVUaW1lUHJvZHVjdE5vdGlmaWNhdGlvbiI6eyJ2ZXJzaW9uIjoiMS4wIiwibm90aWZpY2F0aW9uVHlwZSI6MSwicHVyY2hhc2VUb2tlbiI6Imtia2lkcGptY2Vmb2FmbmhmZGJjbnBjbC5BTy1KMU96V2xlY0trbE5hdWFSd0dZNU9hWndJQzN6b01Ma082VDdnMHZHNmRianNBRTU1YkV5SE9XVHR5NmxSUmtTSS1ZMUFtSXUxd1FpOWt1RFFVNnJwZXY5TlVVTlMwM0djXzFiVmpnbk5mNkdHLVIxcW1GWSIsInNrdSI6Imdvb2dsZS5wYXdhLmRpYW1vbmQxIn19");
//        String decodedString = new String(decodedBytes);
//        String decodedString1 = new String(decodedBytes1);
//        System.out.println("Decoded string: " + decodedString);
//        System.out.println("Decoded string: " + decodedString1);

        String back="{\"message\":{\"data\":\"eyJ2ZXJzaW9uIjoiMS4wIiwicGFja2FnZU5hbWUiOiJjb20uc21pbGVwYXJ0eS5wYXdhbGl2ZSIsImV2ZW50VGltZU1pbGxpcyI6IjE3NDIwMzUwOTc5NTUiLCJvbmVUaW1lUHJvZHVjdE5vdGlmaWNhdGlvbiI6eyJ2ZXJzaW9uIjoiMS4wIiwibm90aWZpY2F0aW9uVHlwZSI6MSwicHVyY2hhc2VUb2tlbiI6ImliYWRpYmVmbmxpam1oaGdmbmFpZW9iYy5BTy1KMU96UDBDeGlsSGh2N1FldGpSbUNNM1IxQ0hyeEJ0RWl0RXBfdXlMbE16WFVPRnJ2bnk3VFZ3UTNERWdOMF9pSmpsVGREb21iZXFfT3BsakxXcVpkU2FFSEZVWWtMSEpvQi1sWFBYZDdzVlBBWFVxUVYxWSIsInNrdSI6Imdvb2dsZS5wYXdhLmRpYW1vbmQxIn19\",\"messageId\":\"14173330845760303\",\"message_id\":\"14173330845760303\",\"publishTime\":\"2025-03-15T10:38:18.116Z\",\"publish_time\":\"2025-03-15T10:38:18.116Z\"},\"subscription\":\"projects/pawa-live/subscriptions/refund-notifications\"}";
        JSONObject res = JSONObject.parseObject(back);
        String decodedData= res.getJSONObject("message").getString("data");
        byte[] decodedBytes = java.util.Base64.getDecoder().decode(decodedData);
        String decodedString = new String(decodedBytes);
        JSONObject notifier = JSONObject.parseObject(decodedString);
        JSONObject voidedPurchaseNotification = notifier.getJSONObject("voidedPurchaseNotification");
        if (voidedPurchaseNotification == null){
            return ;
        }


    }



}
